package com.sqllog.admin.sql.service;

import com.sqllog.admin.sql.datasource.MongoDbSaveDataSourceOption;
import com.sqllog.admin.sql.domain.DatasourceMemoryInfo;
import com.sqllog.admin.sql.entity.MainInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 首页信息
 *
 * @author chennengcheng
 * @date 2022-02-14 8:55
 * @remark
 */

@Service
public class MainInfoService {

    @Resource
    private MongoDbSaveDataSourceOption mongoDbSaveDataSourceOption;

    public MainInfo getMainInfo(){
        DatasourceMemoryInfo datasourceMemoryUsed = mongoDbSaveDataSourceOption.getDatasourceMemoryUsed();
        MainInfo mainInfo = new MainInfo();
        mainInfo.setDatasourceMemoryInfo(datasourceMemoryUsed);
        return mainInfo;
    }

}
